package com.project.bohang.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project.bohang.entity.UserOutRiskRecord;
import com.project.bohang.mapper.UserOutRiskRecordMapper;
import com.project.bohang.pojo.dto.UserOutRiskRecordDto;
import com.project.bohang.pojo.vo.HouseVo;
import com.project.bohang.pojo.vo.UserOutRiskRecordVo;
import com.project.bohang.service.UserOutRiskRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author bohang
 * @since 2022-03-26
 */
@Service
public class UserOutRiskRecordServiceImpl extends ServiceImpl<UserOutRiskRecordMapper, UserOutRiskRecord> implements UserOutRiskRecordService {

    @Resource
    private UserOutRiskRecordMapper userOutRiskRecordMapper;

    @Override
    public IPage<UserOutRiskRecordVo> userSelectList(UserOutRiskRecordDto dto) {
        IPage<UserOutRiskRecordVo> page = new Page<>(dto.getPageIndex(), dto.getPageSize());
        List<UserOutRiskRecordVo> list = userOutRiskRecordMapper.userOutRiskRecordList(page,dto);
        page.setRecords(list);
        return page;
    }
}
